package com.dahua.messagesyncbj.mapper;

import com.dahua.messagesyncbj.entity.Equipment;
import com.dahua.messagesyncbj.entity.Status;
import com.dahua.messagesyncbj.criteria.StatusQueryCriteria;
import com.dahua.messagesyncbj.pojo.EquipmentInfo;
import com.dahua.messagesyncbj.criteria.EquipmentInfoQueryCriteria;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface EquipmentMapper {
    EquipmentInfo enquire(@Param("criteria") EquipmentInfoQueryCriteria criteria);

    List<Equipment> listEquipments(@Param("bk2List") List<String> bk2List, @Param("is_in") boolean is_in);

    List<String> listTypes(@Param("dictId") int dictId, @Param("labelList") List<String> labelList, @Param("is_in") boolean is_in);

    List<Status> listLatestStatus(@Param("statusQuery") StatusQueryCriteria statusQuery);

    boolean updateLatestStatus(@Param("status") Status status);

    void updateLatestStatusBatch(@Param("statuses") List<Status> statuses);

    boolean insertLatestStatus(@Param("status") Status status);

    void deleteLatestStatus(@Param("status") Status status);
}
